package com.fis.hlo.pm.persistence;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

/**
 * <p>
 * Java class for objects complex type.
 * 
 * <p>
 * The following schema fragment specifies the expected content contained within
 * this class.
 * 
 * <pre>
 * &lt;complexType name="objects">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="address" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="code" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="objectId" type="{http://www.w3.org/2001/XMLSchema}long"/>
 *         &lt;element name="oldId" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/>
 *         &lt;element name="parObjectId" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/>
 *         &lt;element name="payArea" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="statusTax" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="telFax" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="tin" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "objects", propOrder = { "address", "code", "name", "objectId",
		"oldId", "parObjectId", "payArea", "status", "statusTax", "telFax",
		"tin", "type" })
public class Objects {

	protected String address;
	protected String code;
	protected String name;
	protected long objectId;
	protected Long oldId;
	protected Long parObjectId;
	protected String payArea;
	protected String status;
	protected String statusTax;
	protected String telFax;
	protected String tin;
	protected String type;

	/**
	 * Gets the value of the address property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getAddress() {
		return address;
	}

	/**
	 * Sets the value of the address property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setAddress(String value) {
		this.address = value;
	}

	/**
	 * Gets the value of the code property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getCode() {
		return code;
	}

	/**
	 * Sets the value of the code property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setCode(String value) {
		this.code = value;
	}

	/**
	 * Gets the value of the name property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getName() {
		return name;
	}

	/**
	 * Sets the value of the name property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setName(String value) {
		this.name = value;
	}

	/**
	 * Gets the value of the objectId property.
	 * 
	 */
	public long getObjectId() {
		return objectId;
	}

	/**
	 * Sets the value of the objectId property.
	 * 
	 */
	public void setObjectId(long value) {
		this.objectId = value;
	}

	/**
	 * Gets the value of the oldId property.
	 * 
	 * @return possible object is {@link Long }
	 * 
	 */
	public Long getOldId() {
		return oldId;
	}

	/**
	 * Sets the value of the oldId property.
	 * 
	 * @param value
	 *            allowed object is {@link Long }
	 * 
	 */
	public void setOldId(Long value) {
		this.oldId = value;
	}

	/**
	 * Gets the value of the parObjectId property.
	 * 
	 * @return possible object is {@link Long }
	 * 
	 */
	public Long getParObjectId() {
		return parObjectId;
	}

	/**
	 * Sets the value of the parObjectId property.
	 * 
	 * @param value
	 *            allowed object is {@link Long }
	 * 
	 */
	public void setParObjectId(Long value) {
		this.parObjectId = value;
	}

	/**
	 * Gets the value of the payArea property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getPayArea() {
		return payArea;
	}

	/**
	 * Sets the value of the payArea property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setPayArea(String value) {
		this.payArea = value;
	}

	/**
	 * Gets the value of the status property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getStatus() {
		return status;
	}

	/**
	 * Sets the value of the status property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setStatus(String value) {
		this.status = value;
	}

	/**
	 * Gets the value of the statusTax property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getStatusTax() {
		return statusTax;
	}

	/**
	 * Sets the value of the statusTax property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setStatusTax(String value) {
		this.statusTax = value;
	}

	/**
	 * Gets the value of the telFax property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getTelFax() {
		return telFax;
	}

	/**
	 * Sets the value of the telFax property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setTelFax(String value) {
		this.telFax = value;
	}

	/**
	 * Gets the value of the tin property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getTin() {
		return tin;
	}

	/**
	 * Sets the value of the tin property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setTin(String value) {
		this.tin = value;
	}

	/**
	 * Gets the value of the type property.
	 * 
	 * @return possible object is {@link String }
	 * 
	 */
	public String getType() {
		return type;
	}

	/**
	 * Sets the value of the type property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setType(String value) {
		this.type = value;
	}

	@Override
	public String toString() {
		if (code != null && !code.equals(""))
			return name + "-" + code;
		return name;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Objects) {
			Objects o = (Objects) obj;
			return o.getObjectId() == objectId;
		}

		return false;
	}

}
